//
//  ExperienceCell.m
//  SP2P
//
//  Created by 吴建东 on 16/6/6.
//  Copyright © 2016年 EIMS. All rights reserved.
//

#import "ExperienceCell.h"

@implementation ExperienceCell

- (void)awakeFromNib {
    // Initialization code
    [super awakeFromNib];
    _amoutLabel.font = KFontSize(36);
    _getTimeLabel.font = KFontSize(12);
    _expiredTimeLabel.font = KFontSize(12);
    _amoutLabel.adjustsFontSizeToFitWidth = YES;
}


- (void)refreshCellWithModel:(ExperienceModel *)model {
    NSString *amountStr = [NSString stringWithFormat:@"￥ %.0f",model.amount];
    _amoutLabel.attributedText = [MyTools getNSMutableAttributedStringWithText:amountStr start:0 end:1 textColor:KColor textFont:KFontSize(13)];
    _getTimeLabel.text = [NSString stringWithFormat:@"获得时间：%@",model.getTime];
    _expiredTimeLabel.text = [NSString stringWithFormat:@"过期时间：%@",model.expiredTime];
    _expiredImageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"experience_%@",model.status]];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
